<?php 

function echoJsonResponse($success, $url = "", $message = ""){
	$json = new stdClass();
	$json->success = $success;
	$json->url = $url;	
	if(!$success){
		if(isset($_SESSION['ERRORMESSAGE'])){
			$message = $_SESSION['ERRORMESSAGE'] .$message ;			
			$_SESSION['ERRORMESSAGE'] = "";
		}
	}	
		
	$json->message = str_replace("<br/>", "\n",$message);
	 
	echo json_encode($json);
	exit;
}


?>